package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SyncLogMapper;
import com.ruoyi.system.domain.SyncLog;
import com.ruoyi.system.service.ISyncLogService;

/**
 * 同步日志Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class SyncLogServiceImpl implements ISyncLogService 
{
    @Autowired
    private SyncLogMapper syncLogMapper;

    /**
     * 查询同步日志
     * 
     * @param logId 同步日志ID
     * @return 同步日志
     */
    @Override
    public SyncLog selectSyncLogById(Long logId)
    {
        return syncLogMapper.selectSyncLogById(logId);
    }

    /**
     * 查询同步日志列表
     * 
     * @param syncLog 同步日志
     * @return 同步日志
     */
    @Override
    public List<SyncLog> selectSyncLogList(SyncLog syncLog)
    {
        return syncLogMapper.selectSyncLogList(syncLog);
    }

    /**
     * 新增同步日志
     * 
     * @param syncLog 同步日志
     * @return 结果
     */
    @Override
    public int insertSyncLog(SyncLog syncLog)
    {
        return syncLogMapper.insertSyncLog(syncLog);
    }

    /**
     * 修改同步日志
     * 
     * @param syncLog 同步日志
     * @return 结果
     */
    @Override
    public int updateSyncLog(SyncLog syncLog)
    {
        return syncLogMapper.updateSyncLog(syncLog);
    }

    /**
     * 批量删除同步日志
     * 
     * @param logIds 需要删除的同步日志ID
     * @return 结果
     */
    @Override
    public int deleteSyncLogByIds(Long[] logIds)
    {
        return syncLogMapper.deleteSyncLogByIds(logIds);
    }

    /**
     * 删除同步日志信息
     * 
     * @param logId 同步日志ID
     * @return 结果
     */
    @Override
    public int deleteSyncLogById(Long logId)
    {
        return syncLogMapper.deleteSyncLogById(logId);
    }
    
    /**
     * 删除任务相关的所有日志
     * 
     * @param syncId 同步任务ID
     * @return 结果
     */
    @Override
    public int deleteSyncLogBySyncId(Long syncId)
    {
        return syncLogMapper.deleteSyncLogBySyncId(syncId);
    }
} 